package com.wenx.v3system.modular.cloud.domain.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Set;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserAuthInfoDto implements Serializable {

    private Long id;
    private String username;
    private String account;
    private String password;
    private String email;
    private String phone;
    private String avatar;
    private String realName;
    private String nickName;
    private Integer gender;
    private Integer age;

    // 日期字段转字符串，避免反射问题
    private String birthday;
    private String entryDate;
    private String lastLoginTime;
    private String passwordExpireTime;

    private String address;
    private String position;
    private String employeeNo;
    private Integer status;
    private String lastLoginIp;
    private Integer loginCount;
    private Boolean mustChangePassword;
    private Boolean twoFactorEnabled;
//    private String preferences;
    private String description;

    // 组织信息
    private Long departmentId;

    // 超级管理员标识
    private Integer superAdmin;

    // Spring Security UserDetails 状态字段
    private Boolean accountNonExpired;
    private Boolean accountNonLocked;
    private Boolean credentialsNonExpired;
    private Boolean enabled;

    // 权限和角色信息
    private Set<String> permissions;
    private Set<Long> roleIds;
    private Set<String> roleCodes;
    private Set<String> roleNames;

    // 数据权限范围
    private Set<Long> dataScopeList;
}
